function tplLoader(source) {
  source = source.replace(/\s+/g, '')
  console.log(source);
  return `
    export default (options) => {

    }
  `
}

// const info = tpl({
//   name: 'wscthhh',
//   age: 18,
//   hobby: 'game'
// })
<div><h1>{{name}}</h1><p>{{age}}</p><p>{{hobby}}</p></div>
module.exports = tplLoader

function tpl(options) {

}